"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const log4js_1 = __importDefault(require("./log4js"));
const logSuccess = log4js_1.default.getLogger('请求成功');
const logFailed = log4js_1.default.getLogger('请求失败');
class Mes {
    static success(mes, data = {}, isPrint = false, success = true) {
        isPrint ? logSuccess.info(mes, data) : logSuccess.info(mes);
        return {
            success,
            mes,
            data
        };
    }
    static failed(mes = '服务器异常，请稍后再试', data = {}, isPrint = true, success = false) {
        isPrint ? logFailed.error(mes, data) : logFailed.error(mes);
        return {
            success,
            mes,
            data
        };
    }
}
exports.default = Mes;
